import request from '@/utils/request'

const baseUrl = 'user-function-loan/user/function/loan'
export const getLoan = (page, limit,form) => {
  return request({
    url: baseUrl + '/findLoans/' + page + '/' + limit,
    method: 'get',
    params: form
  })
}
export const getFindLoan = (page,limit,form) => {
  return request({
    url: baseUrl + '/findLoan/' + page + '/' + limit,
    method: 'get',
    params: form,
  })
}
export const selectUserLoan = data => {
  return request({
    url: baseUrl + '/selectUserLoan',
    method: 'post',
    data,
  })
}

export const addLoan = data => {
  return request({
    url: baseUrl + '/addLoan',
    method: 'post',
    data,
  })
}

export const updateLoan = data => {
  return request({
    url: baseUrl + '/updateLoan',
    method: 'post',
    data,
  })
}
